package com.xbongbong.pro.enums.menu.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.paas.constant.PaasConstant;
import com.xbongbong.paas.enums.MenuTypeEnum;
import com.xbongbong.pro.enums.AccessLinkEnum;
import com.xbongbong.pro.enums.permission.enums.ProPermissionAliasEnum;
import com.xbongbong.saas.enums.XbbRefTypeEnum;
import lombok.Getter;

/**
 * 电子合同
 * 创建时间 2020/6/23 9:41 AM
 * 修改时间 2020/6/23 9:41 AM
 * @author chy
 */
@Getter
public enum EsignMenuEnum {

    /**
     * 字典合同枚举
     */
    ESIGN_RECHARGE("enum.esign.name.esign_recharge_record", XbbRefTypeEnum.ESIGN_RECHARGE.getAlias(),XbbRefTypeEnum.ESIGN_RECHARGE.getCode(),
            AccessLinkEnum.ESIGN_RECHARGE, "controlCenter", MenuTypeEnum.MENU.getType(), ProPermissionAliasEnum.ESIGN_RECHARGE.getAlias()),

    ESIGN_CORP_INFO("enum.esign.name.esign_corp_info", XbbRefTypeEnum.ESIGN_CORP_INFO.getAlias(), XbbRefTypeEnum.ESIGN_CORP_INFO.getCode(),
            AccessLinkEnum.ESIGN_CORP_INFO, "controlCenter", MenuTypeEnum.MENU.getType(), ProPermissionAliasEnum.ESIGN_CORP_INFO.getAlias()),

    ESIGN_OTHER_SET("enum.esign.name.esign_other_set", XbbRefTypeEnum.ESIGN_OTHER_SET.getAlias(), XbbRefTypeEnum.ESIGN_OTHER_SET.getCode(),
            AccessLinkEnum.ESIGN_OTHER_SET, "controlCenter", MenuTypeEnum.MENU.getType(), ProPermissionAliasEnum.ESIGN_OTHER_SET.getAlias()),
    ;

    /**
     * 名称
     */
    private String name;

    /**
     * saas业务标识
     */
    private String alias;

    /**
     * saas业务标识
     */
    private Integer code;
    /**
     * 地址
     */
    private AccessLinkEnum accessLinkEnum;

    /**
     * 所属于哪个页面，home：首页；controlCenter：管理中心
     */
    private String belong;

    /**
     * 类型
     * @see MenuTypeEnum
     */
    private Integer type;

    /**
     * 权限
     */
    private String permission;


    EsignMenuEnum(String name, String alias, Integer code, AccessLinkEnum accessLinkEnum, String belong, Integer type, String permission){
        this.name = name;
        this.alias = alias;
        this.code = code;
        this.accessLinkEnum = accessLinkEnum;
        this.belong = belong;
        this.type = type;
        this.permission = permission;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
